Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Functions for Getting and Playing Movies / Enhancing Movie Playback Performance


SetMovieActiveSegment

You can use the SetMovieActiveSegment function to define a movie's active segment. Your application defines the active segment by specifying the starting time and duration of the segment. These values must be expressed in the movie's time coordinate system. By default, the entire movie is active.

pascal void SetMovieActiveSegment (Movie theMovie, 
                                    TimeValue startTime,
                                    TimeValue duration);
theMovie
Specifies the movie for this operation. Your application obtains this movie identifier from such functions as NewMovie, NewMovieFromFile, and NewMovieFromHandle (described on page 2-80, page 2-76, and page 2-78, respectively).
startTime
Contains a time value specifying the starting point of the active segment. Set this parameter to -1 to make the entire movie active. In this case, the SetMovieActiveSegment function ignores the duration parameter.
duration
Contains a time value that specifies the duration of the active segment. If you are making the entire movie active (by setting the startTime parameter to -1), the Movie Toolbox ignores this parameter.
DESCRIPTION
Your application can retrieve the information that defines a movie's active segment by calling the GetMovieActiveSegment function, which is described in the next section.

SPECIAL CONSIDERATIONS
Note that placing a movie into preview mode destroys the movie's active segment. You use the SetMoviePreviewMode function, described on page 2-107, to control preview mode.

ERROR CODES
invalidMovie-2010This movie is corrupted or invalid
invalidDuration-2014This duration value is invalid
invalidTime-2015This time value is invalid

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996